package cn.caplike.demo.repository.design.pattern.eventbus.jdk.raw;

import java.util.Observable;

public class Client {
    private static final Observable observable = new EventBus();
    private static final String event = "New message coming";

    public static void main(String[] args) {
        observable.addObserver(new EventListener()); // 添加观察者
        observable.notifyObservers(event); // 发布消息
    }
}
